package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)" json:"username"`
	Password string `gorm:"type:varchar(255)" json:"password"`
}

type Role struct {
	gorm.Model
	UserID int  `gorm:"type:int" json:"user_id"`
	User   User `gorm:"foreignKey:UserID" json:"user"`
}

type Quan struct {
	gorm.Model
	RoleID int  `gorm:"type:int" json:"role_id"`
	Role   Role `gorm:"foreignKey:RoleID" json:"role"`
}
